import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: {}
  },
  mutations: {
    getUserInfo(state, user) {
      state.userInfo = user;
      console.log(state.userInfo);
    }
  },
  actions: {
    getUserInfo({ commit }, user) {
      commit('getUserInfo', user);
    }
  },
  modules: {
  }
})
